package com.bnzj.cloud.business.core.persistence.entity;

import com.bnzj.core.persistence.entity.BaseEntity;
import com.bnzj.core.quartz.log.JobLog;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@ToString(callSuper = true)
@RequiredArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "bnz_sys_job_log")
@Schema(description="定时任务日志")
public class SysJobLog extends BaseEntity implements JobLog {
    private static final long serialVersionUID = -632938177387100366L;
    @Schema(description="任务名称")
    private String name;
    
    @Schema(description="任务描述")
    private String description;
    
    @Schema(description="触发器名称")
    private String triggerName;
    
    @Schema(description="开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;
    
    @Schema(description="结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    @Schema(description="运行时长")
    private Float runTime;
    
    @Schema(description="标记")
    private Boolean flag;
    
    @Schema(description="备注")
    private String remark;
}
